* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 400px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14px;
  color: #333;
}

.container {
  padding: 16px;
}

h1 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #1a73e8;
  text-align: center;
}

h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #5f6368;
}

.section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8eaed;
}

.section:last-child {
  border-bottom: none;
}

/* 平台状态 */
.platform-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platform-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
}

.platform-name {
  font-weight: 500;
}

.status-indicator {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-indicator[data-status="online"] {
  background: #e6f4ea;
  color: #1e8e3e;
}

.status-indicator[data-status="offline"] {
  background: #fce8e6;
  color: #d93025;
}

.status-indicator[data-status="unknown"] {
  background: #e8eaed;
  color: #5f6368;
}

/* 表单元素 */
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 8px;
}

textarea:focus {
  outline: none;
  border-color: #1a73e8;
}

input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 14px;
}

input[type="text"]:focus {
  outline: none;
  border-color: #1a73e8;
}

input[type="checkbox"] {
  margin-right: 6px;
}

/* 按钮 */
.btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary {
  background: #1a73e8;
  color: white;
}

.btn-primary:hover {
  background: #1557b0;
}

.btn-secondary {
  background: #e8eaed;
  color: #202124;
}

.btn-secondary:hover {
  background: #dadce0;
}

.btn-danger {
  background: #d93025;
  color: white;
  margin-top: 8px;
}

.btn-danger:hover {
  background: #b31412;
}

/* 平台选择 */
.platform-select {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.platform-select label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e8eaed;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: #1a73e8;
  transition: width 0.3s;
}

#progress-text {
  font-size: 12px;
  color: #5f6368;
}

/* 设置项 */
.setting-item {
  margin-bottom: 12px;
}

.setting-item label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #5f6368;
}

/* 统计信息 */
.stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
}

.stat-label {
  color: #5f6368;
}

.stat-value {
  font-weight: 600;
  color: #1a73e8;
}

/* 数据查看器 */
.data-list {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 12px;
}

.data-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  border-left: 4px solid #1a73e8;
}

.data-item:last-child {
  margin-bottom: 0;
}

.data-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.data-platform {
  font-weight: 600;
  color: #1a73e8;
}

.data-time {
  font-size: 12px;
  color: #5f6368;
}

.data-question {
  background: white;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 13px;
}

.data-question-label {
  font-weight: 600;
  color: #5f6368;
  font-size: 11px;
  margin-bottom: 4px;
}

.data-answer {
  background: white;
  padding: 8px;
  border-radius: 4px;
  font-size: 13px;
  max-height: 150px;
  overflow-y: auto;
}

/* 数据查看器的HTML格式支持 */
.data-answer table {
  border-collapse: collapse;
  width: 100%;
  margin: 6px 0;
  font-size: 11px;
}

.data-answer th,
.data-answer td {
  border: 1px solid #dadce0;
  padding: 4px 6px;
  text-align: left;
}

.data-answer th {
  background: #f8f9fa;
  font-weight: 600;
}

.data-answer ul,
.data-answer ol {
  margin: 6px 0;
  padding-left: 20px;
}

.data-answer li {
  margin: 3px 0;
}

.data-answer h3,
.data-answer h4 {
  margin: 8px 0 4px 0;
  font-size: 13px;
  font-weight: 600;
}

.data-answer strong {
  font-weight: 600;
}

.data-answer-label {
  font-weight: 600;
  color: #5f6368;
  font-size: 11px;
  margin-bottom: 4px;
}

.no-data {
  text-align: center;
  padding: 40px 20px;
  color: #5f6368;
}

.no-data-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* 导出按钮组 */
.export-buttons {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.export-buttons .btn {
  flex: 1;
  font-size: 12px;
  padding: 6px 10px;
}

.btn-small {
  padding: 4px 12px;
  font-size: 12px;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-small:hover {
  background: #1557b0;
}

/* 对比视图 */
.comparison-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
}

.comparison-list {
  max-height: 500px;
  overflow-y: auto;
}

.comparison-group {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.comparison-question {
  background: #e8f0fe;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-weight: 500;
  color: #1967d2;
}

.comparison-platforms {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.platform-response {
  background: #f8f9fa;
  border-left: 4px solid #1a73e8;
  border-radius: 4px;
  padding: 12px;
}

.platform-response.deepseek {
  border-left-color: #1a73e8;
}

.platform-response.yuanbao {
  border-left-color: #34a853;
}

.platform-response.doubao {
  border-left-color: #ea4335;
}

.platform-response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.platform-response-name {
  font-weight: 600;
  font-size: 13px;
}

.platform-response-time {
  font-size: 11px;
  color: #5f6368;
}

.platform-response-content {
  background: white;
  padding: 10px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* HTML格式支持 */
.platform-response-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
  font-size: 12px;
}

.platform-response-content th,
.platform-response-content td {
  border: 1px solid #dadce0;
  padding: 6px 8px;
  text-align: left;
}

.platform-response-content th {
  background: #f8f9fa;
  font-weight: 600;
}

.platform-response-content ul,
.platform-response-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

.platform-response-content li {
  margin: 4px 0;
}

.platform-response-content h3,
.platform-response-content h4 {
  margin: 12px 0 6px 0;
  color: #202124;
}

.platform-response-content p {
  margin: 6px 0;
}

.platform-response-content strong {
  font-weight: 600;
  color: #202124;
}

.platform-response-content code {
  background: #f8f9fa;
  padding: 2px 4px;
  border-radius: 2px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
}

.comparison-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dadce0;
  font-size: 12px;
  color: #5f6368;
}

/* 任务管理 ⭐ 新增 */
.task-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 13px;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: #1a73e8;
  color: white;
}

.button-group {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.button-group .btn {
  flex: 1;
}

.btn-success {
  background: #34a853;
  color: white;
}

.btn-success:hover {
  background: #2d8e47;
}

.btn-success:disabled {
  background: #dadce0;
  color: #5f6368;
  cursor: not-allowed;
}

#task-progress-bar {
  margin: 12px 0;
}

/* 任务列表 ⭐ 新增 */
#task-list-container {
  margin: 12px 0;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 2px;
}

/* 滚动条样式 */
.task-list::-webkit-scrollbar {
  width: 6px;
}

.task-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 任务卡片 */
.task-item-card {
  padding: 12px;
  background: #f8f9fa;
  border: 2px solid #e8eaed;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.task-item-card:hover {
  background: #f1f3f4;
  border-color: #1a73e8;
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.1);
}

.task-item-card.selected {
  background: #e8f0fe;
  border-color: #1a73e8;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.2);
}

.task-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.task-item-name {
  font-weight: 600;
  color: #202124;
  font-size: 14px;
  flex: 1;
  margin-right: 8px;
}

.task-item-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: #1a73e8;
  color: white;
  white-space: nowrap;
}

.task-item-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}

.task-item-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #5f6368;
}

.detail-icon {
  font-size: 14px;
}

.task-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #80868b;
  padding-top: 6px;
  border-top: 1px solid #dadce0;
}

/* 选中任务信息 */
.selected-task-info {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 10px 12px;
}

.selected-task-info .task-item {
  padding: 4px 0;
  background: transparent;
  font-size: 13px;
}

